package com.javabean;

import lombok.Data;

@Data
public class Traveller {
    private int id;
    private String name;
    private String sex;
    private String phoneNum;
    private int credentialsType;//'证件类型 0身份证 1护照 2军官证',
    private String credentialsNum;
    private int travellerType;//'旅客类型(人群) 0 成人 1 儿童',

    public String getCredentialsTypeStr() {
        // 证件类型 0：身份证 1：护照 2：军官证
        if (credentialsType == 0) {
            return "身份证";
        } else if (credentialsType == 1) {
            return "护照";
        } else if (credentialsType == 2) {
            return "军官证";
        }
        return "";
    }

    public String getTravellerTypeStr() {
        // 证件类型 0：成人 1：儿童
        if (travellerType == 0) {
            return "成人";
        } else if (travellerType == 1) {
            return "儿童";
        }

        return "";
    }
}
